package com.lzkj.baotouhousingfund.utils;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.widget.ImageView;

import com.zhihu.matisse.engine.ImageEngine;

/**
 * @author Chengs
 * @Description: Glide 4.6.1适配
 * @date 2018/3/9 15:54
 */
public class GlideEngine implements ImageEngine {
    @Override
    public void loadThumbnail(Context context, int resize, Drawable placeholder, ImageView
            imageView, Uri uri) {
        ImageLoader.loadBitmap(context, resize, placeholder, imageView, uri);
    }

    @Override
    public void loadGifThumbnail(Context context, int resize, Drawable placeholder, ImageView
            imageView, Uri uri) {
        ImageLoader.loadBitmap(context, resize, placeholder, imageView, uri);
    }

    @Override
    public void loadImage(Context context, int resizeX, int resizeY, ImageView imageView, Uri uri) {
        ImageLoader.loadOverrideAndPriority(context, resizeX, resizeY, uri, imageView);
    }

    @Override
    public void loadGifImage(Context context, int resizeX, int resizeY, ImageView imageView, Uri
            uri) {
        ImageLoader.loadGIfOverrideAndPriority(context, resizeX, resizeY, uri, imageView);
    }

    @Override
    public boolean supportAnimatedGif() {
        return true;
    }
}
